<?php $tpl->addCSS('css/search.css'); ?>

<h2><?php echo $heading_title; ?></h2>
<div id="search">
  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
    <div class="a"><?php echo $text_critea; ?></div>
    <div class="b">
      <div class="c">
        <table>
          <tr>
            <td><?php echo $entry_search; ?></td>
            <td><?php if ($search) { ?>
              <input type="text" name="search" value="<?php echo $search; ?>" />
              <?php } else { ?>
              <input type="text" name="search" value="<?php echo $text_keywords; ?>" onclick="this.value = ''" />
              <?php } ?></td>
          </tr>
          <tr>
            <td colspan="2">
              <input class="checkbox_search_description" type="checkbox" name="description"<?php if ($description) { ?> checked="checked"<?php }?> />
              <?php echo $entry_description; ?></td>
          </tr>
        </table>
      </div>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><input class="button_search" type="submit" value="<?php echo $button_search; ?>" /></td>
          </tr>
        </table>
      </div>
    </div> 
  </form>
  <h2><?php echo $text_search; ?></h2>
  <?php if (isset($products)) { ?>
  <div class="results"> 
    <div class="left"><?php echo $text_results; ?></div>
    <div class="right pagination">
    <span id="entry_page"><?php echo $entry_page; ?></span>
    <?php foreach ($pages as $p) { ?>
    <a href="<?php echo $p['href']; ?>"<?php if ($p['value'] == $page) { ?> id="current"<?php } ?>><?php echo $p['value']; ?></a>
    <?php } ?>
    </div>
  </div>
  <?php } else { ?>
  <div class="d"><?php echo $text_error; ?></div>
  <?php }?>
</div>